/*
Copyright (c) 2025 Huawei Technologies Co., Ltd.
This file is a part of the CANN Open Software.
Licensed under CANN Open Software License Agreement Version 1.0 (the "License").
Please refer to the License for details. You may not use this file except in compliance with the License.
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
See LICENSE in the root of the software repository for the full text of the License. 
*/

#pragma once

#define L1M0 128
#define L1N0 256
#define L1K0 256
#define WORKSPACENUM 2
#define SWIZZLEOFFSET 8
#define SWIZZLEDIRECTION 1 

static constexpr uint64_t L1_BYTES = 512 * 1024;
static constexpr uint64_t L0AB_BYTES = 64 * 1024;
static constexpr uint64_t L0C_BYTES = 128 * 1024;
static constexpr uint64_t UB_BYTES = 192 * 1024;

constexpr uint64_t DATABLOCK_BYTES = AscendC::GetDataBlockSizeInBytes();
constexpr uint64_t L1L0_BASEBLOCK_BYTES = 512;
constexpr uint32_t L1L0_BASEBLOCK_M0 = 16;
constexpr uint32_t L1L0_BASEBLOCK_N0 = 16;
constexpr uint32_t L1L0_BASEBLOCK_K0 = 32 / sizeof(half);
constexpr uint32_t L1L0_BASEBLOCK_CUBE = 16; // Mmad正方形基块
constexpr uint32_t L1L0_BASEBLOCK_SIZE = L1L0_BASEBLOCK_BYTES / sizeof(half);

constexpr uint32_t STRIDE_LIMIT = 65536;
constexpr uint32_t MAX_AICORE_NUM = 20;

